<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>user info</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/user-info.css" />
	</head>

	<body>
		
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">用户信息</h1>
		</header>
		
		
		<div class="mui-content">
		    <ul class="mui-table-view" style="margin-top:-1px">
		            <li class="mui-table-view-cell headpic">
		                <a class="mui-navigate-right">
		                	 <!--capture="camera"-->
		                	 <form action="" name="file" class="file">
		             	     	用户头像 <input type="file" id="img" name="img"/>
		             	     </form>
		             	     <div id="vessel"></div>
		                </a>
		            </li>
		            <li class="mui-table-view-cell">
		                <a class="mui-navigate-right">
		                                        用户名
		                </a>
		            </li>
		            <li class="mui-table-view-cell">
		                <a class="mui-navigate-right">
		                                       账号密码
		                </a>
		            </li>
		            <li class="mui-table-view-cell">
		                <a class="mui-navigate-right">
		                                       手机号码
		                </a>
		            </li>
		        </ul>
		        
		        <button class="mui-btn mui-btn-block outlogin">退出登录</button>
		</div>
		
		
		<script src="js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init()
			var file = document.getElementById("img");
	        file.onchange = function(){  // 文本框内容改变时触发
	            var files = this.files; // 获取文件的数量
	            for(var i=0;i<files.length;i++){
	                readers(files[i])
	            }
	        }
        function readers(fil){
            var reader = new FileReader();  // 异步读取存储在用户计算机上的文件
            reader.readAsDataURL(fil); // 开始读取指定的Blob对象或File对象中的内容
            reader.onload = function(){
                document.getElementById("vessel").innerHTML += "<img src='"+reader.result+"'>";  // 添加图片到指定容器中
            };
        }
		</script>
	</body>

</html>